home *** CD-ROM | disk | FTP | other *** search
-
-
- §
-
- §
-
- åMenu Events Suite
-
-
-
- The following is a formal description of the Menu Events suite, in the form
-
- used in the Apple Event Registry.
-
-
-
- NOTE: The C header file “Menu Events.h” contains the constant
-
- definitions which appear here. The “Menu Events Scripting Addition” file
-
- contains an 'aete' resource which records the following dictionary
-
- information, for the benefit of scripting packages such as AppleScript.
-
- This package also includes a sample script, “Menu Events Sample
-
- Script,” which demonstrates the usage of the following events and
-
- parameters.
-
-
-
-
- xApple events defined in the Menu Events suite
-
-
- Name Requested action
-
-
-
- Query Menu List List all application-defined menus
-
- Query Menu List all items in a menu
-
- Select Menu Item Perform a menu command
-
-
-
-
- xQuery Menu List - list all application-defined menus
-
-
- A Query Menu List Apple event asks the application to return a list of
-
- records containing information about all menus defined by the application
-
- in its menu bar. This information includes the Apple menu, but not the
-
- Help, Keyboard, or Application menus.
-
-
-
- Event Class kMEEventClass
-
-
- Event ID kAEMEQueryMenuList
-
-
- Parameters none
-
-
- Reply Parameters
-
-
-
- keyDirectObject
-
- Description: A list of Apple event
-
- records, one for each
-
- menu, each containing the
-
- following parameters
-
- Descriptor Type: typeAEList
-
- Required or Optional? Required
-
-
-
-
- keyMenuID
-
- Description: The ID of the menu, not
-
- necessarily equal to the
-
- ID of the 'MENU' resource
-
- it may have come from
-
- Descriptor Type: typeShortInteger
-
- Required or Optional? Required
-
-
-
- keyMenuTitle
-
- Description: The title of the menu, as
-
- it appears in the menu bar
-
- Descriptor Type: typeChar
-
- Required or Optional? Required
-
-
-
- keyMenuEnabled
-
- Description: Whether or not the menu, as
-
- a whole, is enabled
-
- Descriptor Type: typeBoolean
-
- Required or Optional? Required
-
-
-
- keyMenuMDEFID
-
- Description: The ID of the menu definition
-
- procedure ('MDEF') resource,
-
- ordinarily 0; -1 signifies
-
- that the definition procedure
-
- is not a resource
-
- Descriptor Type: typeShortInteger
-
- Required or Optional? Required
-
-
-
-
- keyMenuEventsTattoo
-
- Description: A null parameter to verify
-
- that Menu Events handled
-
- the event
-
- Descriptor Type: typeNull
-
- Required or Optional? Required
-
-
-
-
- Result Codes
-
- mBarNFnd -126 The application has
-
- no menu bar
-
-
-
-
-
- xQuery Menu - list all items in a menu
-
-
- A Query Menu Apple event asks the application to return a list of records
-
- containing information about all items in a given menu. This information is
-
- complete enough to reconstruct the menu, except for the icon resources
-
- referenced by the keyMenuItemIcon parameter.
-
-
-
- Event Class kMEEventClass
-
-
- Event ID kAEMEQueryMenu
-
-
- Parameters
-
-
-
- keyMenuID
-
- Description: The ID of the menu, as
-
- returned by a Query Menu
-
- List Apple event
-
- Descriptor Type: typeShortInteger
-
- Required or Optional? Required
-
-
-
- Reply Parameters
-
-
-
- keyDirectObject
-
- Description: A list of Apple event
-
- records, one for each
-
- item, each containing the
-
- following parameters
-
- Descriptor Type: typeAEList
-
- Required or Optional? Required
-
-
-
-
- keyMenuItemID
-
- Description: The ID of the item, numbered
-
- from 1 at the top of the menu
-
- Descriptor Type: typeShortInteger
-
- Required or Optional? Required
-
-
-
- keyMenuItemText
-
- Description: The text of the item, as
-
- it appears in the menu
-
- Descriptor Type: typeChar
-
- Required or Optional? Required
-
-
-
- keyMenuItemEnabled
-
- Description: Whether or not the item is
-
- enabled
-
- Descriptor Type: typeBoolean
-
- Required or Optional? Required
-
-
-
- keyMenuItemMark
-
- Description: The mark character of the
-
- item, in the lower byte
-
- Descriptor Type: typeShortInteger
-
- Required or Optional? Required
-
-
-
- keyMenuItemIcon
-
- Description: The icon number of the item,
-
- which is 256 less than the
-
- resource ID of the 'ICON' or
-
- 'cicn' resource
-
- Descriptor Type: typeShortInteger
-
- Required or Optional? Required
-
-
-
- keyMenuItemStyle
-
- Description: The style value of the item,
-
- in the lower byte
-
- Descriptor Type: typeShortInteger
-
- Required or Optional? Required
-
-
-
- keyMenuItemCmd
-
- Description: The Command-key equivalent
-
- character of the item, in the
-
- lower byte
-
- Descriptor Type: typeShortInteger
-
- Required or Optional? Required
-
-
-
-
- keyMenuEventsTattoo
-
- Description: A null parameter to verify
-
- that Menu Events handled
-
- the event
-
- Descriptor Type: typeNull
-
- Required or Optional? Required
-
-
-
-
- Result Codes
-
- mBarNFnd -126 The application has
-
- no menu bar
-
-
-
- noSuchMenuErr -21000 The application has
-
- no such menu
-
-
-
-
-
- xSelect Menu Item - perform a menu command
-
-
- A Select Menu Item event requests user interaction to bring the
-
- application to the front, then posts mouse events to simulate the selection
-
- of the given menu item, with modifier key states as specified. If the Menu
-
- event is correctly handled, and the application reacts to the mouse events
-
- in the usual way, the result is as if the user had actually selected that
-
- menu item. Interaction will fail if the application refuses to interact with
-
- other processes (kAEInteractWithSelf mode), or, if the application is on
-
- another machine and the Menu Events extension has been locked, if it
-
- refuses to interact with remote processes (kAEInteractWithLocal mode).
-
-
- Event Class kMEEventClass
-
-
- Event ID kAEMESelectMenuItem
-
-
- Parameters
-
-
-
- keyMenuID
-
- Description: The ID of the menu, as
-
- returned by a Query Menu
-
- List Apple event
-
- Descriptor Type: typeShortInteger
-
- Required or Optional? Required
-
-
-
- keyMenuItemID
-
- Description: The ID of the item, numbered
-
- from 1 at the top of the menu
-
- Descriptor Type: typeShortInteger
-
- Required or Optional? Required
-
-
-
- keyShiftKeyPressed
-
- Description: Whether the Shift key is
-
- pressed at the time of the
-
- simulated menu selection
-
- Descriptor Type: typeBoolean
-
- Required or Optional? Optional
-
- Default Value: false
-
-
-
- keyControlKeyPressed
-
- Description: Whether the Control key is
-
- pressed at the time of the
-
- simulated menu selection
-
- Descriptor Type: typeBoolean
-
- Required or Optional? Optional
-
- Default Value: false
-
-
-
- keyOptionKeyPressed
-
- Description: Whether the Option key is
-
- pressed at the time of the
-
- simulated menu selection
-
- Descriptor Type: typeBoolean
-
- Required or Optional? Optional
-
- Default Value: false
-
-
-
- keyCommandKeyPressed
-
- Description: Whether the Command key is
-
- pressed at the time of the
-
- simulated menu selection
-
- Descriptor Type: typeBoolean
-
- Required or Optional? Optional
-
- Default Value: false
-
-
-
- Reply Parameters
-
-
-
- keyMenuEventsTattoo
-
- Description: A null parameter to verify
-
- that Menu Events handled
-
- the event
-
- Descriptor Type: typeNull
-
- Required or Optional? Required
-
-
-
-
- Result Codes
-
- mBarNFnd -126 The application has
-
- no menu bar
-
-
-
- errAENoUserInteraction
-
- -1713 The application is
-
- refusing to interact
-
- with other processes
-
- or (if Menu Events
-
- extension is locked)
-
- with remote processes
-
-
-
- noSuchMenuErr -21000 The application has
-
- no such menu
-
-
-
- noSuchMenuItemErr
-
- -21001 The menu has no
-
- such item
-
-
-
- menuItemDisabledErr
-
- -21002 The item is
-
- disabled
-
-
-
- menuEventPendingErr
-
- -21003 Another Menu event
-
- is already pending
-
- on this application
-
-
-
-
-
- xConstants defined in the Menu Events suite
-
-
- Constant Value
-
-
-
- kAEMEQueryMenu 'qmn '
-
- kAEMEQueryMenuList 'qmn#'
-
- kAEMESelectMenuItem 'semi'
-
- keyCommandKeyPressed 'comk'
-
- keyControlKeyPressed 'conk'
-
- keyMenuEnabled 'mnen'
-
- keyMenuEventsTattoo 'M√¶nu'
-
- keyMenuID 'mnid'
-
- keyMenuItemCmd 'micm'
-
- keyMenuItemEnabled 'mien'
-
- keyMenuItemIcon 'miic'
-
- keyMenuItemID 'miid'
-
- keyMenuItemMark 'mima'
-
- keyMenuItemStyle 'mist'
-
- keyMenuItemText 'mite'
-
- keyMenuMDEFID 'mndf'
-
- keyMenuTitle 'mnti'
-
- keyOptionKeyPressed 'optk'
-
- keyShiftKeyPressed 'shik'
-
- kMEEventClass 'M√¶nu'
-
- menuEventPendingErr -21003
-
- menuItemDisabledErr -21002
-
- noSuchMenuErr -21000
-
- noSuchMenuItemErr -21001
-
-
-
-